<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateChannelTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('channel', function (Blueprint $table) {
            $table->id();
            $table->integer('agent_id')->nullable()->default(0)->comment('代理商id');
            $table->string('name', 64)->nullable()->comment('渠道名称');
            $table->string('contact', 16)->comment('渠道联系人');
            $table->string('mobile', 16)->unique()->comment('手机号');
            $table->string('uuid', 16)->comment('渠道uuid');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('channel');
    }
}
